<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>view/workArea/logistics/logistics</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="../../../css/mui.min.css">
		<link rel="stylesheet" href="../../../css/global.css">
		<link rel="stylesheet" href="../../../css/style.css">
		<link rel="stylesheet" href="../../../css/timeline.css">
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 id="title" class="mui-title">物流查询</h1>
		</header>
		<div class="mui-content">
			<br/>
			<p style="text-align: center; display: none;" id="noneMessage">—— 当前无物流信息 ——</p>
			<ul class="layui-timeline" id="timeline">
			    <!-- <li class="layui-timeline-item">
			        <div class="relative">
			            <span class="time-first">06:40</span>
			        </div>
			        <i class="layui-icon layui-timeline-axis circle"></i>
			        <div class="layui-timeline-content layui-text">
			            <h3 class="layui-timeline-title">江北国际机场2A</h3>
			            <p>
			                layui 2.0 的一切准备工作似乎都已到位。发布之弦，一触即发。
			            </p>
			        </div>
			    </li>
			    <li class="layui-timeline-item">
			        <div class="relative">
			            <span class="time-first">06:40</span>
			        </div>
			        <i class="layui-icon layui-timeline-axis circle"></i>
			        <div class="layui-timeline-content layui-text">
			            <h3 class="layui-timeline-title">8月16日</h3>
			            <p>杜甫的思想核心是儒家的仁政思想，他有<em>“致君尧舜上，再使风俗淳”</em>的宏伟抱负。个人最爱的名篇有：</p>
			        </div>
			    </li>
			    <li class="layui-timeline-item">
			        <div class="relative">
			            <span class="time-first">06:40:12</span>
			        </div>
			        <i class="layui-icon layui-timeline-axis circle"></i>
			        <div class="layui-timeline-content layui-text">
			            <h3 class="layui-timeline-title">8月15日</h3>
			            <p>
			                中国人民抗日战争胜利日
			            </p>
			        </div>
			    </li>
			    <li class="layui-timeline-item">
			        <i class="layui-icon layui-timeline-axis circle"></i>
			        <div class="layui-timeline-content layui-text">
			            <div class="layui-timeline-title">过去</div>
			        </div>
			    </li> -->
			</ul>
		</div>

		<!-- js代码 start -->

		<!-- 基础js start -->
		<script src="../../../js/mui.min.js"></script>
		<script src="../../../js/utils/h.js"></script>
		<script src="../../../js/constant.js"></script>
		<script src="../../../js/common.js"></script>
		<script src="../../../js/utils/base64.js"></script>
		<script src="../../../js/utils/md5.js"></script>
		<script src="../../../js/utils/sortMap.js"></script>
		<script src="../../../js/utils/http.js"></script>
		<script src="../../../js/app.js"></script>
		<!-- 基础js end -->

		<script type="text/javascript" charset="utf-8">
			(function($, doc) {
				$.init();

				$.plusReady(function() {
					var self = plus.webview.currentWebview();
					// 上页参数 —— 图片故障描述是否显示标识 1是 0否
					logisticNo = self.logisticNo;
					shipercode = self.shipercode;
					custname = self.custname;
					
					// 查询物流
					ajaxGet(BASE_URL + "cc/spareParts/getLogisticsInfoByNumber",{
						"logisticNo": logisticNo,
						"shipercode": shipercode,
						"custname": custname
					},function(data) {
						if (data.code === 200) {
							var str = '';
							var dataObj = JSON.parse(data.data);
							var list = dataObj.record;
							if (list.length > 0) {
								for(var i = 0; i<list.length; i++){
									var info = list[i];
									var dateTime = info.AcceptTime.replace(/-/g,'/').trim();
									var acceptTime = new Date(dateTime);
									var acceptStation = info.AcceptStation;
									var day = acceptTime.Format("yyyy-MM-dd");
									var time = acceptTime.Format("HH:mm:ss");
									str += '<li class="layui-timeline-item">';
									str += '<div class="relative">';
									str += '<span class="time-first">'+ time +'</span>';
									str += '</div>';
									str += '<i class="layui-icon layui-timeline-axis circle"></i>';
									str += '<div class="layui-timeline-content layui-text">';
									str += '<h3 class="layui-timeline-title">'+ day +'</h3>';
									str += '<p>' + acceptStation + '</p>';
									str += '</div>';
									str += '</li>';
								}
								h('#timeline').html(str);
							} else {
								h("#noneMessage").show()
								app.toast(dataObj.message)
							}
						} else {
							h("#noneMessage").show()
							app.toast(data.msg)
						}
					}, function(errorMsg) {
						h("#noneMessage").show()
						app.toast(errorMsg)
					});
				});
			}(mui, document));
		</script>
		<!-- js代码 end -->

	</body>

</html>